/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package generationgraphe;

import java.util.ArrayList;
import java.util.List;
import java.util.Observable;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;

/**
 *
 * @author mazid
 */
public class PlageCellule extends Observable implements ITableauEntier{
    private List<String> cellules;
    private Table table;
    private int maxVal = 30 ;

    public PlageCellule(){
       cellules=new ArrayList<>();
       cellules = Table.getInstance().getCellSelected();
    }
    
   public void affiche(){
       System.out.println(cellules);
       if(cellules==null){
           System.out.println("veuillez selectionner quelque cellules ");
       }
       for(Object o:cellules){
           System.out.println("Valeur : "+o);
       }
    }

    
    public int getLongueur() {
        return cellules.size();
    }

    
    public int getValeur(int num) {
        return Integer.parseInt(cellules.get(num));
    }

    
    public int getMaximum() {
        return maxVal;
    }

}
